Multi-threaded and/or multi-core processors are commonplace today. They are used in various types of computing devices such as servers, desktops, laptops, netbooks, tablets, smartphones, and cell phones, to name just a few examples. With the increase in multicore technology, parallel programming has become ubiquitous the trend to increasingly more threads and/or cores is expect to continue into the future. Unfortunately, writing correct and efficient parallel programs continues to be a challenge for many developers because of any number of factors.
One factor in particular that contributes to the difficulty in debugging is the non-deterministic nature of the execution of such software. For example, the threads of a multi-threaded program may interleave differently from one execution of the program to the next. Such variance in the interleaving of the threads may cause variance into the ordering of the accesses by the threads to shared memory from one execution of the program to the next. For example, the threads may access the shared memory in one particular interleaved order one time the program is executed, but the threads may access the shared memory in a different interleaved order another time the program is executed.
Some types of bugs in particular may be difficult to analyze, debug, and fix, as a result of such non-deterministic execution behavior. For example, concurrency bugs may only occur under some but not all thread interleavings and/or shared memory access orderings. For example, a concurrency bug may occur one time a program is executed with a particular thread interleaving (and/or shared memory access ordering), but the concurrency bug may not occur another time the program is executed with a different thread interleaving (and/or different shared memory access ordering). This may tend to make it difficult for a software developer, software debugger, or the like, to know, let alone reproduce, the particular thread interleaving and/or shared memory access ordering that resulted in the concurrency bug.
This tends to lead to greater programming inefficiencies, waste of resources, such as power, time, performance, human resources, etc., and further leads to higher software development costs and/or potential delays in bringing the multi-threaded or parallel processing software to market.